const {http}=require("../../utils/utils")


Page({
    data: {

    },
    onLoad(){
        var url=`http://47.108.197.28:3000/top/playlist/highquality`
        http({
            url,
            success:res=>{
                // console.log(res)
                var lists = res.data.playlists;
                var result = [];
                lists.forEach(item => {
                    var {
                        name,
                        coverImgUrl,
                        playCount
                    } = item;
                    var num=Math.floor(playCount/10000)+"万"
                    result.push({
                        name,
                        coverImgUrl,
                        num
                    });
                })
                // console.log(result)
                this.setData({result})
            }
        })
    },
})